﻿CREATE TABLE [dbo].[CampoPerfil] (
    [Id]               INT           IDENTITY (1, 1) NOT NULL,
    [IdGrupo]          INT           NULL,
    [Nome]             VARCHAR (100) NOT NULL,
    [Descricao]        VARCHAR (255) NOT NULL,
    [Tipo]             INT           NOT NULL,
    [TipoControle]     INT           NOT NULL,
    [Obrigatorio]      BIT           NOT NULL,
    [ExpressaoRegular] VARCHAR (500) NULL,
    [MaxLenght]        INT           NULL,
    [Ativo]            BIT           NOT NULL,
    PRIMARY KEY CLUSTERED ([Id] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF),
    FOREIGN KEY ([IdGrupo]) REFERENCES [dbo].[CampoPerfil] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION
);

